package com.pni.game.cards.deck;

import com.pni.game.cards.Card;
import com.pni.game.cards.CardRank;
import com.pni.game.cards.CardSuit;


/**
 * Creates a deck of standard playing cards.  That is the standard 52 cards of suit (Hearts, Diamonds, Spades, Clubs)
 * with ranks ordered from (2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, Ace).
 * 
 * @author neevans
 *
 */
public class StandardCardDeckFactory implements DeckFactory {

	public Deck createDeck() {
		Deck deck = new DeckImpl();
		
		for(CardSuit suit : CardSuit.values()){ //loop through the suits
			for(CardRank rank : CardRank.values()){ //loop through the ranks
				Card card = new Card(rank, suit);
				deck.placeCardOnDeck(card);
			}
		}
		
		return deck;
		
	}

}
